import json
import traceback

from fastapi import APIRouter
from re_common.baselibrary.tools.myparsel import MParsel
from re_common.baselibrary.utils.basedict import BaseDicts
from re_common.baselibrary.utils.core.mlamada import bools_string
from re_common.baselibrary.utils.core.requests_core import MsgCode

from apps.core.callback import default_call_back
from apps.core.m_route import ContextIncludedRoute
from apps.core.return_info import ReturnInfo
from apps.crawler_platform.core_platform.core_nosql import NoSqlUtil
from apps.crawler_platform.core_platform.core_sql import CoreSqlMixin
from apps.crawler_platform.core_platform.g_model import InputPlatformModel, ParaAllModel

router = APIRouter(route_class=ContextIncludedRoute)


@router.post("/etl/etl_all")
async def etl_all():
    while True:
        etl_rows = await CoreSqlMixin.get_etl_article()
        if etl_rows:
            for row in etl_rows:

                await NoSqlUtil.read_nosql_html(row[""])



    pass